﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Kinect.Framework.Controls;
using Kinect.Framework.Lib;
using Kinect.ShowCase.Views;

namespace Kinect.ShowCase
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : KinectWindow
    {
        public MainWindow()
        {
            InitializeComponent();
            Loaded += new RoutedEventHandler(OnLoaded);
        }

        void OnLoaded(object sender, RoutedEventArgs e)
        {
            var list = new List<string>();
            for (int i = 0; i < 8; i++)
                list.Add("MENU " + i);
            ContextMenu.ItemsSource = list;
            //KinectWindow.GestureController(this).CircleManipulationDetected += new Framework.Controller.KinectManipulationController.CircleManipulationDetectedEventHandler(MainWindow_CircleManipulationDetected);
            //KinectWindow.GestureController(this).WaveManipulationDetected += new Framework.Controller.KinectManipulationController.WaveManipulationDetectedEventHandler(MainWindow_WaveManipulationDetected);
            //KinectWindow.GestureController(this).SteadyManipulationDetected += new Framework.Controller.KinectManipulationController.SteadyManipulationDetectedEventHandler(MainWindow_SteadyManipulationDetected);
            //KinectWindow.GestureController(this).PushManipulationDetected += new Framework.Controller.KinectManipulationController.PushManipulationDetectedEventHandler(MainWindow_PushManipulationDetected);
            //KinectWindow.GestureController(this).SwipeManipulationDetected += new Framework.Controller.KinectManipulationController.SwipeManipulationDetectedEventHandler(MainWindow_SwipeManipulationDetected);
        }

        private void OnShowGestureViewClick(object sender, RoutedEventArgs e)
        {
            View.Content = new GestureView();
        }
        private void OnKinectListBoxViewClick(object sender, RoutedEventArgs e)
        {
            View.Content = new KinectListBoxView();
        }
        private void OnKinectButtonViewClick(object sender, RoutedEventArgs e)
        {
            View.Content = new KinectButtonView();
        }
        private void OnKinectScrollViewerViewClick(object sender, RoutedEventArgs e)
        {
            View.Content = new KinectScrollViewerView();
        }
        private void OnKinectContextMenuViewClick(object sender, RoutedEventArgs e)
        {
            View.Content = new KinectContextMenuView();
        }
        //OnKinectScrollViewerViewClick
        //void MainWindow_SwipeManipulationDetected(object s, PayloadEventArgs<KinectSwipeManipulation> e)
        //{
        //    ManipulationDebug.Text = "Swipe manipulation detected";
        //}

        //void MainWindow_PushManipulationDetected(object s, PayloadEventArgs<KinectManipulationBase> e)
        //{
        //    ManipulationDebug.Text = "Push manipulation detected";
        //}

        //void MainWindow_SteadyManipulationDetected(object s, PayloadEventArgs<KinectPointer> e)
        //{
        //    ManipulationDebug.Text = "Steady manipulation detected";
        //}

        //void MainWindow_WaveManipulationDetected(object s, EventArgs e)
        //{
        //    ManipulationDebug.Text = "Wave manipulation detected";
        //}

        //void MainWindow_CircleManipulationDetected(object s, EventArgs e)
        //{
        //    ManipulationDebug.Text = "Circle manipulation detected";
        //}
    }
}
